x,y,width,height
x,y,width,height are the position of grid within its parent grid, and its size in pixels.
If a grid has no parent grid, x,y is its position within the window that contains it.
x1,y1:x2,y2
x1,y1:x2,y2 are the upper-left:lower-right corners of grid in local coordinates. x1,y1 are
fixed at 0,0 in local coordinates, while x2,y2 are always width-1,height-1 .
x1,y1:x2,y2 are established when grid is created by XgrCreateGrid() or resized by
XgrSetGridPositionAndSize().
x1Grid,y1Grid:x2Grid,y2Grid
x1Grid,y1Grid:x2Grid,y2Grid are the upper-left:lower-right corners of grid in grid
coordinates. When a grid is created, its x1Grid,y1Grid:x2Grid,y2Grid is set to
0,0:width-1,height-1 .
No matter what values x1Grid,y1Grid:x2Grid,y2Grid contain, x1Grid,y1Grid are the grid
coordinates of the grids upper-left corner and x2Grid,y2Grid are the grid coordinates of
the grids lower-right corner.
Sometimes it is convenient to reverse x-axis and/or y-axis direction. x2Grid < x1Grid
makes x-axis grid coordinates increase toward the left, while y2Grid < y1Grid makes
y-axis grid coordinates increase toward the top.
x1#,y1#:x2#,y2#
x1#,y1#:x2#,y2# are the upper-left:lower-right corners of grid in scaled coordinates. When
a grid is created, x1#,y1#:x2#,y2# are set to 0,0:x2,x2 , same as the local coordinates.
No matter what values x1#,y1#:x2#,y2# contain, x1#,y1# are the scaled coordinates of the
grids upper-left corner and x2#,y2# are the scaled coordinates of the grids lower-right
corner.
Sometimes it is convenient to reverse x-axis and/or y-axis direction. x2# < x1# makes
x-axis scaled coordinates increase toward the left, while y2# < y1# makes y-axis scaled
coordinates increase toward the top.
drawpoint, drawpointGrid, drawpointScaled
drawpoint , drawpointGrid , drawpointScaled are the current drawing coordinates for local,
grid, and scaled coordinates, which means the final point specified in the previous draw
or move function. For example, drawpoints are left at the endpoint of lines drawn line
drawing functions, and at the position specified in move functions.
drawpoint, drawpointGrid, drawpointScaled are independent, one for each coordinate system.